using System.Collections.Generic;
using Entitas;
using Entitas.CodeGeneration.Attributes;
using UnityEngine;

[Logic, Unique]
public sealed class Tick : IComponent
{
    public int Value;
}

[Logic]
public sealed class Cell : IComponent { }

[Logic]
public sealed class CellColor : IComponent
{
    public int Value;
}

[Logic]
public sealed class Position : IComponent
{
    public Vector3 Value;
}

[Logic]
public sealed class GridPos : IComponent
{
    public GridPosition Value;
}

[Logic]
public sealed class Hp : IComponent
{
    public int Value;
}

[Logic]
public sealed class Grid : IComponent
{
    public List<LogicEntity> CellLst;
}

[Logic, Unique]
public sealed class Board : IComponent
{
    public LogicEntity[,] Grids;
}

[Logic]
public sealed class Destroy : IComponent { }

[Logic]
public sealed class DestroyCell : IComponent
{
    public int TargetFrame;
    public int CurFrame;
}

[Logic]
public sealed class CreateCell : IComponent
{
    public int TargetFrame;
    public int CurFrame;
    public int Hp;
    public int Color;
    public Vector3 Pos;
}

[Logic]
public sealed class EliminateCell : IComponent
{
    public int TargetFrame;
    public int CurFrame;
}

[Logic]
public sealed class ResourceInfo : IComponent
{
    public string AssetName;
}

[Logic]
public sealed class LogicView : IComponent
{
    public GameObject Go;
    public CellView View;
}